﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.HelpURLAttribute
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using System;
using UnityEngine.Scripting;

#nullable disable
namespace UnityEngine
{
  /// <summary>
  ///   <para>Provide a custom documentation URL for a class.</para>
  /// </summary>
  [UsedByNativeCode]
  [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
  public class HelpURLAttribute : Attribute
  {
    internal readonly string m_Url;
    internal readonly bool m_Dispatcher;
    internal readonly string m_DispatchingFieldName;

    /// <summary>
    ///   <para>Initialize the HelpURL attribute with a documentation url.</para>
    /// </summary>
    /// <param name="url">The custom documentation URL for this class.</param>
    public HelpURLAttribute(string url)
    {
      this.m_Url = url;
      this.m_DispatchingFieldName = "";
      this.m_Dispatcher = false;
    }

    internal HelpURLAttribute(string defaultURL, string dispatchingFieldName)
    {
      this.m_Url = defaultURL;
      this.m_DispatchingFieldName = dispatchingFieldName;
      this.m_Dispatcher = !string.IsNullOrEmpty(dispatchingFieldName);
    }

    /// <summary>
    ///   <para>The documentation URL specified for this class.</para>
    /// </summary>
    public string URL => this.m_Url;
  }
}
